<h2>Edit user</h2>
<div class="row">
  <div class="col-md-6">
  <form novalidate ng-repeat="user in users" name="AddNewForm" id="add-new-form" method="post" action="">
    <input type="hidden" ng-model="user.id" value="{{user.id}}" />
    <div class="form-group">
      <label for="username">Username:</label>
      <input class="form-control" type="text" ng-model="user.username" value="{{user.username}}" required />
    </div>
    <div class="form-group">
      <label for="first_name">First name:</label>
      <input class="form-control" type="text" ng-model="user.first_name" value="{{user.first_name}}" required />
    </div>
    <div class="form-group">
      <label for="last_name">Last name:</label>
      <input class="form-control" type="text" ng-model="user.last_name" value="{{user.last_name}}" required />
    </div>
    <div class="form-group">
      <label for="address">Address:</label>
      <input class="form-control" type="text" ng-model="user.address" value="{{user.address}}" />
    </div>
    <button class="btn btn-primary" ng-disabled="AddNewForm.$invalid || isUnchanged(user)" id="add-new-btn" ng-click="update(user)">Update <span class="glyphicon glyphicon-floppy-disk"></span></button>
    <button class="btn btn-danger" ng-click="delete(user)">Delete <span class="glyphicon glyphicon-trash"></span></button>
    <a href="#/" class="btn">Cancel</a>
  </form>
</div>
</div>